Release 10.1A: OpenEdge Reporting:
Query/Results for UNIX


Adding a math expression

This section explains how to add a math expression to determine the cost for each order line in a customer’s order. To do this, you define the math expression to multiply the number of units in each order line by the cost for each unit.

To add a math expression to determine the cost for each order line in a customer’s order:

  1. Select Define.
  2. Since you have already defined files you plan to work with, the screen displays a list of options you can choose from to expand your report:

  3. Select Math Expressions. Results displays a list of operations:
  4. You can select any of these operations to create your math expression.

  5. Select Multiply. A window opens that lists all the numeric fields in the active files:
  6. Results prompts you to enter the first multiplier in your math expression. In this tutorial, you multiply the number of units on hand by the cost for each unit.

  7. Select the Qty field.
  8. The list of numeric fields you can pick appears again. The expression begins to build in the Expression window and Results prompts you to choose the next multiplier:

  9. Select the Price from Item database field.
  10. The Price field appears in the Expression window and Results prompts you to continue adding to this expression:

    If you select Yes, you can continue to add to the expression using any of the math operations (Add, Subtract, Multiply, Divide, or Raise to a Power) and Results automatically groups them with parentheses. In this tutorial, you will multiply these two selected fields.

  11. Select No.
  12. The screen clears to the Report layout window and another window, Formats and Labels, appears. Here you can redefine the default label and format information for the new numeric field created by the Math Expression:

The Report Info. window contains the following:


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095